<div class="real-contents max-contents">
	<form action="/SmartClass/taskAPI/createTask" id="createForm" method="post">
		<div class="clearfix " style="display: block">
			<span class="rectangle left-min-margin"></span>
			<span class="title">题干</span>
		</div>
		<ul class="input-ul ">
			<li class="input-li">
				<textarea id="info" name="title" class="input-border" style="margin-left: 0px; outline: none; resize: none;" rows="5" cols="120" notEmpty="请输入题干信息"></textarea>
			</li>
		</ul>
		<div class="clearfix " style="display: block">
			<span class="rectangle left-min-margin"></span>
			<span class="title">选项</span>
		</div>
		<ul class="input-ul ">
			<li class="input-li">
				<span class="input-title">A 选项：</span>
				<span class="input-border">
					<input type="text" class="input-text" style="width: 190px;" name="option1" placeholder="此处填写选项1" notEmpty="请填写A选项的信息" />
				</span>
			</li>
			<li class="input-li">
				<span class="input-title">B 选项：</span>
				<span class="input-border">
					<input type="text" class="input-text" style="width: 190px;" name="option2" placeholder="此处填写选项2" notEmpty="请填写B选项的信息" />
				</span>
			</li>
			<li class="input-li">
				<span class="input-title">C 选项：</span>
				<span class="input-border">
					<input type="text" class="input-text" style="width: 190px;" name="option3" placeholder="此处填写选项3" notEmpty="请填写C选项的信息" />
				</span>
			</li>
			<li class="input-li">
				<span class="input-title">D 选项：</span>
				<span class="input-border">
					<input type="text" class="input-text" style="width: 190px;" name="option4" placeholder="此处填写选项4" notEmpty="请填写D选项的信息" />
				</span>
			</li>
		</ul>
		<div class="clearfix " style="display: block">
			<span class="rectangle left-min-margin"></span>
			<span class="title">正确答案</span>
		</div>
		<ul class="input-ul" style="margin-top: 30px;">
			<li class="input-li" style="margin-bottom: 0">
				<input type="radio" name="answer" value="A" checked="checked">
				<span class="input-title" style="margin-left: 5px; margin-right: 12px;">选项A</span>
				<input type="radio" name="answer" value="B">
				<span class="input-title" style="margin-left: 5px; margin-right: 12px;">选项B</span>
				<input type="radio" name="answer" value="C">
				<span class="input-title" style="margin-left: 5px; margin-right: 12px;">选项C</span>
				<input type="radio" name="answer" value="D">
				<span class="input-title" style="margin-left: 5px; margin-right: 12px;">选项D</span>
			</li>
		</ul>
	</form>
	<li class="input-li" style="margin-bottom: 0">
		<button class="page-margin input-border min-submit" id="create">生成习题</button>
	</li>
</div>
<script type="text/javascript">
	$(function() {

		$("#create").click(function() {
			var pass = 1;
			$("[notEmpty]").each(function(i, e) {
				if ($(e).val() == "") {
					alert_text("warning", $(e).attr("notEmpty"), function() {
					});
					pass = 0;
					return false;
				}

			});
			if (pass == 1) {
				ajaxForm($('#createForm'), function() {
					alert_text("ok", "创建成功", function() {
						history.go(0);
					});

				}, function(res) {
					alert_text("warning", res.msg);
				})
			}
		})
	});
</script>